import 'package:flutter_deer/index/models/football_ratio_entity.dart';
import 'package:flutter_deer/generated/json/base/json_convert_content.dart';

FootballRatioGroupEntity $FootballRatioGroupEntityFromJson(Map<String, dynamic> json) {
  final FootballRatioGroupEntity footballRatioGroupEntity = FootballRatioGroupEntity();
  final String? groupId = jsonConvert.convert<String>(json['groupId']);
  if (groupId != null) {
    footballRatioGroupEntity.groupId = groupId;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    footballRatioGroupEntity.title = title;
  }
  final int? endBetting = jsonConvert.convert<int>(json['endBetting']);
  if (endBetting != null) {
    footballRatioGroupEntity.endBetting = endBetting;
  }
  final List<FootballRatioEntity>? ratios = jsonConvert.convert<List<FootballRatioEntity>>(json['ratios']);
  if (ratios != null) {
    footballRatioGroupEntity.ratios = ratios;
  }
  final double? groupRatio = jsonConvert.convert<double>(json['groupRatio']);
  if (groupRatio != null) {
    footballRatioGroupEntity.groupRatio = groupRatio;
  }
  final FootballGameUnstartEntity? guessBallNum = jsonConvert.convert<FootballGameUnstartEntity>(json['guessBallNum']);
  if (guessBallNum != null) {
    footballRatioGroupEntity.guessBallNum = guessBallNum;
  }
  return footballRatioGroupEntity;
}

Map<String, dynamic> $FootballRatioGroupEntityToJson(FootballRatioGroupEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['groupId'] = entity.groupId;
  data['title'] = entity.title;
  data['endBetting'] = entity.endBetting;
  data['ratios'] = entity.ratios;
  data['groupRatio'] = entity.groupRatio;
  data['guessBallNum'] = entity.guessBallNum;
  return data;
}

FootballRatioEntity $FootballRatioEntityFromJson(Map<String, dynamic> json) {
  final FootballRatioEntity footballRatioEntity = FootballRatioEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    footballRatioEntity.id = id;
  }
  final String? gameId = jsonConvert.convert<String>(json['gameId']);
  if (gameId != null) {
    footballRatioEntity.gameId = gameId;
  }
  final String? gameName = jsonConvert.convert<String>(json['gameName']);
  if (gameName != null) {
    footballRatioEntity.gameName = gameName;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    footballRatioEntity.title = title;
  }
  final String? playWay = jsonConvert.convert<String>(json['playWay']);
  if (playWay != null) {
    footballRatioEntity.playWay = playWay;
  }
  final String? score = jsonConvert.convert<String>(json['score']);
  if (score != null) {
    footballRatioEntity.score = score;
  }
  final String? outcome = jsonConvert.convert<String>(json['outcome']);
  if (outcome != null) {
    footballRatioEntity.outcome = outcome;
  }
  final String? outcomeName = jsonConvert.convert<String>(json['outcomeName']);
  if (outcomeName != null) {
    footballRatioEntity.outcomeName = outcomeName;
  }
  final String? bettingType = jsonConvert.convert<String>(json['bettingType']);
  if (bettingType != null) {
    footballRatioEntity.bettingType = bettingType;
  }
  final double? odds = jsonConvert.convert<double>(json['odds']);
  if (odds != null) {
    footballRatioEntity.odds = odds;
  }
  final FootballGameEntity? game = jsonConvert.convert<FootballGameEntity>(json['game']);
  if (game != null) {
    footballRatioEntity.game = game;
  }
  return footballRatioEntity;
}

Map<String, dynamic> $FootballRatioEntityToJson(FootballRatioEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['gameId'] = entity.gameId;
  data['gameName'] = entity.gameName;
  data['title'] = entity.title;
  data['playWay'] = entity.playWay;
  data['score'] = entity.score;
  data['outcome'] = entity.outcome;
  data['outcomeName'] = entity.outcomeName;
  data['bettingType'] = entity.bettingType;
  data['odds'] = entity.odds;
  data['game'] = entity.game;
  return data;
}

FootballGameUnstartEntity $FootballGameUnstartEntityFromJson(Map<String, dynamic> json) {
  final FootballGameUnstartEntity footballGameEntity = FootballGameUnstartEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    footballGameEntity.id = id;
  }
  final String? specialId = jsonConvert.convert<String>(json['specialId']);
  if (specialId != null) {
    footballGameEntity.specialId = specialId;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    footballGameEntity.name = name;
  }
  final String? footballTeamOne = jsonConvert.convert<String>(json['footballTeamOne']);
  if (footballTeamOne != null) {
    footballGameEntity.footballTeamOne = footballTeamOne;
  }
  final String? footballTeamTwo = jsonConvert.convert<String>(json['footballTeamTwo']);
  if (footballTeamTwo != null) {
    footballGameEntity.footballTeamTwo = footballTeamTwo;
  }
  final String? playTime = jsonConvert.convert<String>(json['playTime']);
  if (playTime != null) {
    footballGameEntity.playTime = playTime;
  }
  final String? playDate = jsonConvert.convert<String>(json['playDate']);
  if (playDate != null) {
    footballGameEntity.playDate = playDate;
  }
  final FootballTeamEntity? teamOne = jsonConvert.convert<FootballTeamEntity>(json['teamOne']);
  if (teamOne != null) {
    footballGameEntity.teamOne = teamOne;
  }
  final FootballTeamEntity? teamTwo = jsonConvert.convert<FootballTeamEntity>(json['teamTwo']);
  if (teamTwo != null) {
    footballGameEntity.teamTwo = teamTwo;
  }
  final FootballGameRatioEntity? ratio = jsonConvert.convert<FootballGameRatioEntity>(json['ratio']);
  if (ratio != null) {
    footballGameEntity.ratio = ratio;
  }
  final int? endBetting = jsonConvert.convert<int>(json['endBetting']);
  if (endBetting != null) {
    footballGameEntity.endBetting = endBetting;
  }
  return footballGameEntity;
}

Map<String, dynamic> $FootballGameUnstartEntityToJson(FootballGameUnstartEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['specialId'] = entity.specialId;
  data['name'] = entity.name;
  data['footballTeamOne'] = entity.footballTeamOne;
  data['footballTeamTwo'] = entity.footballTeamTwo;
  data['playTime'] = entity.playTime;
  data['playDate'] = entity.playDate;
  data['teamOne'] = entity.teamOne;
  data['teamTwo'] = entity.teamTwo;
  data['ratio'] = entity.ratio;
  data['endBetting'] = entity.endBetting;
  return data;
}

FootballGameEntity $FootballGameEntityFromJson(Map<String, dynamic> json) {
  final FootballGameEntity footballGameEntity = FootballGameEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    footballGameEntity.id = id;
  }
  final String? specialId = jsonConvert.convert<String>(json['specialId']);
  if (specialId != null) {
    footballGameEntity.specialId = specialId;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    footballGameEntity.name = name;
  }
  final String? footballTeamOne = jsonConvert.convert<String>(json['footballTeamOne']);
  if (footballTeamOne != null) {
    footballGameEntity.footballTeamOne = footballTeamOne;
  }
  final String? footballTeamTwo = jsonConvert.convert<String>(json['footballTeamTwo']);
  if (footballTeamTwo != null) {
    footballGameEntity.footballTeamTwo = footballTeamTwo;
  }
  final String? playTime = jsonConvert.convert<String>(json['playTime']);
  if (playTime != null) {
    footballGameEntity.playTime = playTime;
  }
  final String? playDate = jsonConvert.convert<String>(json['playDate']);
  if (playDate != null) {
    footballGameEntity.playDate = playDate;
  }
  final FootballTeamEntity? teamOne = jsonConvert.convert<FootballTeamEntity>(json['teamOne']);
  if (teamOne != null) {
    footballGameEntity.teamOne = teamOne;
  }
  final FootballTeamEntity? teamTwo = jsonConvert.convert<FootballTeamEntity>(json['teamTwo']);
  if (teamTwo != null) {
    footballGameEntity.teamTwo = teamTwo;
  }
  final List<FootballGameRatioEntity>? ratios = jsonConvert.convert<List<FootballGameRatioEntity>>(json['ratios']);
  if (ratios != null) {
    footballGameEntity.ratios = ratios;
  }
  return footballGameEntity;
}

Map<String, dynamic> $FootballGameEntityToJson(FootballGameEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['specialId'] = entity.specialId;
  data['name'] = entity.name;
  data['footballTeamOne'] = entity.footballTeamOne;
  data['footballTeamTwo'] = entity.footballTeamTwo;
  data['playTime'] = entity.playTime;
  data['playDate'] = entity.playDate;
  data['teamOne'] = entity.teamOne;
  data['teamTwo'] = entity.teamTwo;
  return data;
}

FootballTeamEntity $FootballTeamEntityFromJson(Map<String, dynamic> json) {
  final FootballTeamEntity footballTeamEntity = FootballTeamEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    footballTeamEntity.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    footballTeamEntity.name = name;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    footballTeamEntity.image = image;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    footballTeamEntity.remark = remark;
  }
  return footballTeamEntity;
}

Map<String, dynamic> $FootballTeamEntityToJson(FootballTeamEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['image'] = entity.image;
  data['remark'] = entity.remark;
  return data;
}

FootballGameRatioEntity $FootballGameRatioEntityFromJson(Map<String, dynamic> json) {
  final FootballGameRatioEntity footballGameRatioEntity = FootballGameRatioEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    footballGameRatioEntity.id = id;
  }
  final String? gameId = jsonConvert.convert<String>(json['gameId']);
  if (gameId != null) {
    footballGameRatioEntity.gameId = gameId;
  }
  final String? playWay = jsonConvert.convert<String>(json['playWay']);
  if (playWay != null) {
    footballGameRatioEntity.playWay = playWay;
  }
  final String? score = jsonConvert.convert<String>(json['score']);
  if (score != null) {
    footballGameRatioEntity.score = score;
  }
  final String? outcome = jsonConvert.convert<String>(json['outcome']);
  if (outcome != null) {
    footballGameRatioEntity.outcome = outcome;
  }
  final String? bettingType = jsonConvert.convert<String>(json['bettingType']);
  if (bettingType != null) {
    footballGameRatioEntity.bettingType = bettingType;
  }
  final double? odds = jsonConvert.convert<double>(json['odds']);
  if (odds != null) {
    footballGameRatioEntity.odds = odds;
  }
  final double? minBallNum = jsonConvert.convert<double>(json['minBallNum']);
  if (minBallNum != null) {
    footballGameRatioEntity.minBallNum = minBallNum;
  }
  final double? maxBallNum = jsonConvert.convert<double>(json['maxBallNum']);
  if (maxBallNum != null) {
    footballGameRatioEntity.maxBallNum = maxBallNum;
  }
  return footballGameRatioEntity;
}

Map<String, dynamic> $FootballGameRatioEntityToJson(FootballGameRatioEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['gameId'] = entity.gameId;
  data['playWay'] = entity.playWay;
  data['score'] = entity.score;
  data['outcome'] = entity.outcome;
  data['bettingType'] = entity.bettingType;
  data['odds'] = entity.odds;
  data['minBallNum'] = entity.minBallNum;
  data['maxBallNum'] = entity.maxBallNum;
  return data;
}